<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style lang="text/css">
    .wrap{
      width: 100%;
      height: 100%;
    }
    /* 登录框 */
    .login-wrap{
        position: fixed;
        width: 300px;
        height: 400px;
        border: 1px solid red;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        margin: auto;
    }
  </style>
</head>
<body>
  <div class="wrap">
    <div class="login-wrap"></div>
  </div>
</body>
</html>